package com.fbinggun.sql;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Test {
    static String ip="localhost:3306";
    static String use ="root";
    static String password ="root";
    static String data="mc";
    public static void main(String[] args) throws SQLException, ClassNotFoundException {
        getConnections();
    }


    public static Connection getConnections() throws SQLException, ClassNotFoundException {
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            Connection connection = DriverManager.getConnection("jdbc:mysql://"+ip+"/"+data+"?useSSL="+false+"&autoReconnect=true&",use, password);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
